package com.study.service.impl.hx;

import com.study.entity.SysUser;
import com.study.mapper.SysUserMapper;
import com.study.service.api.hx.SysUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 用户登录
 */
@Service
public class SysUserServiceImpl implements SysUserService {
    @Resource
    private SysUserMapper sysUserMapper;

    /**
     * 登录
     * @return
     */
    @Override
    public String login(String userName, String passWord) {
        return sysUserMapper.login(userName, passWord);
    }

    /**
     * 根据id查找用户
     * @param chrId
     * @return
     */
    @Override
    public SysUser findUserById(String chrId) {
        return sysUserMapper.findUserById(chrId);
    }

    /**
     * @description 查询用户
     * @author hw
     * @date 2021/9/22 20:40:19
     * @param sysUser:
     * @return com.study.entity.SysUser
     */
    @Override
    public SysUser findUser(SysUser sysUser) {
        return sysUserMapper.findUser(sysUser);
    }

    /**
     * 修改用户
     * @param sysUser
     * @return
     */
    @Override
    public int updateSysUser(SysUser sysUser) {
        return sysUserMapper.updateSysUser(sysUser);
    }
}
